***This do-file creates Figure O3 of the paper
**Curtis RESTAT
**Change to directory where data and code were downloaded
**cd 

set matsize 10000
set more off
use qwi_all_figureO3.dta,clear
qui do qwi_dataprep_figureO3.do
unique state
gen lemps=ln(emps+1)
gen lemp=ln(empend+1)
gen lhiras=ln(hiras)
gen lseps=ln(seps)
gen hire_rate=hiras/emps
gen sep_rate=seps/emps
gen learns=ln(earns)
gen lpayroll=ln(payroll)
qui tab quarter,gen(seasondum)

qui areg nempsep nbpxintxqtrdum1-nbpxintxqtrdum20 nbpxintxqtrdum22-nbpxintxqtrdum44 postxeast postxint intxeast trendstatedum* trendinddum* qtrdum*  [aweight=emp_weight2],abs(state_ind) rob cluster(state_ind)

parmest,format(estimate min95 max95) saving(qtrcoeffs_nemp.dta,replace)
use qtrcoeffs_nemp,clear
keep in 1/43



local new = _N + 1
set obs `new'
replace parm="nbpxintxqtrdum21" if parm==""
replace estimate=0 if estimate==.
replace min95=0 if min95==.
replace max95=0 if max95==.
gen quarter=substr(parm,15,.)
destring quarter,replace
so quarter
twoway line estimate min95 max95 quarter, clcolor(blue green green) lpattern(solid dash dash) 

